Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow C++17 language features. #2298

Merged
merged 17 commits into from Jan 4, 2019
Merged

Allow C++17 language features. #2298

merged 17 commits into from Jan 4, 2019

Conversation

endJunction
Copy link
Member

The current minimum compilers must support it though.

@endJunction
Copy link
Member Author

@bilke For the Eigen-3.2.10, I think a new branch in https://github.com/bilke/conan-eigen3/tree/release/3.2.9 is needed. Could you create one? I have no push permission there; Just two changes:

diff --git a/Jenkinsfile b/Jenkinsfile
index 9afb89d..4ec378a 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -2,4 +2,4 @@
 
 // Implementation at:
 // https://github.com/ufz/jenkins-pipeline-library/blob/master/vars/conanBuild.groovy
-conanBuild("Eigen3/3.2.9")
+conanBuild("Eigen3/3.2.10")
diff --git a/conanfile.py b/conanfile.py
index 6151a0d..c7344f1 100644
--- a/conanfile.py
+++ b/conanfile.py
@@ -5,7 +5,7 @@ from conans.tools import download, unzip
 class Eigen3Conan(ConanFile):
     name = "Eigen3"
     description = "Eigen is a C++ template library for linear algebra"
-    version = "3.2.9"
+    version = "3.2.10"
     generators = "cmake"
     exports = ["FindEigen3.cmake"]
     url="http://github.com/bilke/conan-eigen3"

@bilke
Copy link
Member

bilke commented Dec 18, 2018

TODO self: Remove FindEigen3.cmake?

In CMake 3.12 and above the ``find_package(PackageName)`` command now searches
a prefix specified by a ``PackageName_ROOT`` CMake or environment variable.
Package roots are maintained as a stack so nested calls to all ``find_*``
commands inside find modules also search the roots as prefixes.  This policy
provides compatibility with projects that have not been updated to avoid using
``PackageName_ROOT`` variables for other purposes.

The ``OLD`` behavior for this policy is to ignore ``PackageName_ROOT``
variables.  The ``NEW`` behavior for this policy is to use ``PackageName_ROOT``
variables.

This policy was introduced in CMake version 3.12.  CMake version
3.12.0 warns when the policy is not set and uses ``OLD`` behavior.
Use the ``cmake_policy()`` command to set it to ``OLD`` or ``NEW``
explicitly.

@endJunction
Copy link
Member Author

@bilke maybe netlify also needs a --force for submodules?

@bilke
Copy link
Member

bilke commented Dec 19, 2018

@endJunction There is no way to configure git stuff.. I cleared the cache and rebuild, works.

@bilke bilke force-pushed the c++17 branch 3 times, most recently from c53cf4c to a107d1b Compare December 19, 2018 13:41
@bilke
Copy link
Member

bilke commented Dec 19, 2018

@endJunction This is strange, on mac on running the tests GeoLib.InsertTwoPointsInGrid and NumLibDistributionQuad.InterpolationSurface (and maybe more) sometimes I get a segfault, and sometimes a malloc error:

Note: Google Test filter = GeoLib.InsertTwoPointsInGrid
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from GeoLib
[ RUN      ] GeoLib.InsertTwoPointsInGrid
testrunner(46498,0x10ca965c0) malloc: can't allocate region
*** mach_vm_map(size=2305825481739694080) failed (error code=3)
testrunner(46498,0x10ca965c0) malloc: *** set a breakpoint in malloc_error_break to debug
/Users/bilke/code/ogs6/ogs/Tests/GeoLib/TestGrid.cpp:42: Failure
Expected: GeoLib::Grid<GeoLib::Point> grid(pnts.begin(), pnts.end()) doesn't throw an exception.
  Actual: it throws.
[  FAILED  ] GeoLib.InsertTwoPointsInGrid (1 ms)

and

➜ bin/testrunner --gtest_filter=NumLibDistributionQuad.InterpolationSurface

Note: Google Test filter = NumLibDistributionQuad.InterpolationSurface
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from NumLibDistributionQuad
[ RUN      ] NumLibDistributionQuad.InterpolationSurface
testrunner(47852,0x10ece85c0) malloc: *** error for object 0x7000000000000000: pointer being freed was not allocated
testrunner(47852,0x10ece85c0) malloc: *** set a breakpoint in malloc_error_break to debug
zsh: abort      bin/testrunner --gtest_filter=NumLibDistributionQuad.InterpolationSurface

Switching googletest from master to tag 1.8.1 did not help.

endJunction and others added 16 commits January 4, 2019 10:14
The `bool uncaught_exception()' is deprecated since c++17
and is replaced by `int uncaught_exceptions()'.
Related to c++17 removed binder* functions.
Fixed in http://eigen.tuxfamily.org/bz/show_bug.cgi?id=1276
http://eigen.tuxfamily.org/index.php?title=ChangeLog#Eigen_3.2.10

Other binder* functions were removed only in the 3.3 branch.
The latter takes a random generator while the former uses
std::rand implicitly.
The std::random_shuffle was marked deprecated and is removed
from the c++17.
The original gtest folder is removed.

Reason is the removed namespace std::tr1 no longer available in the VS2017.
Fixed in PR google/googletest#1218
and the related issue is google/googletest#1138
Contains up-to-date FindPETSc and FindNetCDF.
The original initialization of the std::array's was by copy anyway
and somehow caused in seg faults on mac after adding c++17 standard.
MacOS repeatedly could not finish in 3h.
Failing on mac now with error 9.2e-7 since c++17/Eigen-3.3 change.
In multi-threaded environments multiple ctests running
parallel fight for the same cpu threads otherwise.
@@ -7,7 +7,7 @@ module load git

# Libraries
module load boost/1.62.0-1
module load eigen/3.3.4-1-cmake
module load eigen/3.3.4-1-cmake # TODO update/create module on eve
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is available now.

@ogsbot
Copy link
Member

ogsbot commented Jun 19, 2020

OpenGeoSys development has been moved to GitLab.

See this pull request on GitLab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants